<template>
    <div>
        <header class="sys-header">
            <!--<span>静海区国办幼儿园招生报名管理系统</span>-->
            <img src="../../images/header.jpg" class="img-fluid">
        </header>

        <div class="user-container">
            <nav class="navbar navbar-expand-lg navbar-light  pro-link-item" v-if="type != '录入'">
                <div class="container d-flex justify-content-end">
                    <ul class="nav navbar-nav pr-4">
                        <router-link :to="{ name:'user-manage' }"><li v-if="type == 'admin'"><span>用户管理</span></li></router-link>
                        <router-link :to="{ name:'log' }"><li v-if="type == 'admin'"><span>操作日志</span></li></router-link>
                        <router-link :to="{ name:'enroll-situation' }"><li v-if="type == 'admin'"><span>幼儿园管理</span></li></router-link>
                        <router-link :to="{ path:'/home/all-list/' + user.school_id }"><li><span>报名管理</span></li></router-link>
                    </ul>
                </div>
            </nav>
            <div class="router-view-container">
                <router-view></router-view>
            </div>
        </div>
    </div>
</template>
<script>
  export default {
    name: 'app',
    data(){
      return {
        type: ''
      }
    },
    created(){
     this.type = this.$store.state.user.type
//      console.log(this.type)
    },
    computed:{
      user(){
        return this.$store.state.user
      }
    },
    mounted(){
//        $('a').each(function (e) {
//          $(this).click(function ()
//          {
//            $(this).addClass('active')
//          })
//        })
    },

  }
</script>
<style lang="scss" scoped>
    .pro-link-item {
        border-top: 1px solid #6c7d43;
        background-color: #6c7d43 ;
        height: 40px;
    .container {
    a {
        text-decoration: none;
        height: 39px;
        line-height: 26px;
        font-size: 12px;
        color: #daf2ce;
        padding: 14px;
        padding-top: 7px;
        padding-bottom: 7px;
    }
    .active {
        font-weight: 700;
    }
    }
    }
</style>
